package com.zzyl.controller.customer;

import com.zzyl.base.ResponseResult;
import com.zzyl.controller.BaseController;
import com.zzyl.entity.UserLoginRequestDto;
import com.zzyl.service.MemberService;
import com.zzyl.vo.LoginVo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping("/customer/user")
public class CustomerUserController extends BaseController {

    private final MemberService memberService;

    @PostMapping("/login")
    public ResponseResult loginCustomer(@RequestBody UserLoginRequestDto userLoginRequestDto){
            LoginVo loginVo = memberService.loginCustomer(userLoginRequestDto);
            return success(loginVo);
    }
}
